home *** CD-ROM | disk | FTP | other *** search
- Path: sunsite.doc.ic.ac.uk!cs.york.ac.uk
- From: John Kennedy <johnk@cs.york.ac.uk>
- Newsgroups: comp.lang.c++
- Subject: C++ guru sought ...
- Message-ID: <316CB5B5.41C6@cs.york.ac.uk>
- Date: Thu, 11 Apr 1996 08:33:09 +0100
- Organization: Department of Computer Science
- MIME-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (X11; I; IRIX 5.3 IP22)
-
- Hi there,
-
- I have an interesting C++ problem that I was wondering if any guru out
- there knows the answer to....
-
- I am trying to create a template class that saves or reads data to/from
- a file. This is not a problem for numeric data as fstream can cope with
- this no problem. The problem I have is that when the template type is a
- string I have to create the space to store the data in. The only way I
- can see of doing this is to use a case statement in the template
- function but this is then removing all purpose of creating a template in
- the first place.
-
- Does anyone know a way around this problem ?
-
- John Kennedy
-
- johnk@cs.york.ac.uk
-